<template>
    <div>
        <span v-show="status == 'DRAFT'" class="pub-list-draft">{{ conversion == 'zh' ? text : '未提交' }}</span>
        <template v-if="step != '0'">
            <span v-if="status === 'SUBMITTED' && isApproval" class="pub-list-audit">{{
                    conversion == 'zh' ? text : '审批中'
                }}</span>
            <span v-if="status === 'SUBMITTED' && !isApproval" class="pub-list-audit">{{
                    conversion == 'zh' ? text : '已提交'
                }}</span>
        </template>
        <span v-else class="pub-list-pass">{{ conversion == 'zh' ? text : '已完成' }}</span>
        <span v-show="status === 'WRITESUBMITTED'" class="pub-list-draft">{{ conversion === 'zh' ? text : '销项待提交审核'
            }}</span>
        <span v-show="status === 'WRITEPAST'" class="pub-list-draft">{{ conversion === 'zh' ? text : '销项审核中' }}</span>
        <span v-show="status === 'PAST'" class="pub-list-pass">{{ conversion == 'zh' ? text : '审批通过' }}</span>
        <span v-show="status === 'PASS'" class="pub-list-pass">{{ conversion == 'zh' ? text : '销项审批通过' }}</span>
        <span v-show="status === 'SIGNSTATUS'" class="pub-list-pass">{{ conversion == 'zh' ? text : '会签中' }}</span>
        <span v-show="status === 'REJECTED'" class="pub-list-rejected">{{ conversion == 'zh' ? text : '销项审批不通过' }}</span>
        <span v-show="status === 'REJECTEDS'" class="pub-list-rejected">{{ conversion == 'zh' ? text : '审批不通过' }}</span>
        <span v-show="status === 'DELETE'" class="pub-list-del">{{ conversion == 'zh' ? text : '已删除' }}</span>
    </div>
</template>
<script>
/*
* 法务的后端状态整错了，说改状态要改流程。算了
*
* */
import template from '@/views/construction/gantt/template.vue'

export default {
    components: { template },
    props: {
        status: {
            type: String
        },
        text: {
            type: String
        },
        //是否是审批状态的数据
        isApproval: {
            type: Boolean,
            default() {
                return false
            }
        },
        // 有步骤状态的最后一步提交后应该显示为已完成
        step: {
            type: [String, Number],
            default() {
                return '-1'
            }
        },
        conversion: {
            type: String,
            default() {
                return 'zh'
            }
        }
    }
}
</script>
<style>
.pub-list-draft::before,
.pub-list-audit::before,
.pub-list-pass::before,
.pub-list-rejected::before,
.pub-list-del::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 10px;
}

.pub-list-audit::before {
    background-color: rgb(16, 141, 233);
}

.pub-list-pass::before {
    background-color: rgb(0, 168, 84);
}

.pub-list-rejected::before {
    background-color: rgb(254, 85, 0);
}

.pub-list-draft::before {
    background-color: rgb(255, 255, 0);
}

.pub-list-del::before {
    background-color: rgb(173, 173, 173);
}
</style>
